package io.xccit.common.enums;

import lombok.Getter;

/**
 * @author CH_ywx
 * @date 2023-06-22
 * @description 统一结果枚举
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"SUCCESS"),
    FAIL(201,"FAIL"),
    SERVICE_ERROR(2012,"服务异常"),
    DATA_ERROR(204,"数据异常"),
    ILLEGAL_ERROR(205,"非法请求"),
    REPEAT_SUBMIT(206,"重复提交"),
    ARGUMENT_VALID_ERROR(210, "参数校验异常"),
    LOGIN_AUTH(208, "未登录状态"),
    PERMISSION(403, "没有权限"),
    ACCOUNT_ERROR(214, "账号不正确"),
    PASSWORD_ERROR(215, "密码不正确"),
    ACCOUNT_STOP( 217, "账号已停用"),
    NODE_ERROR( 218, "该节点下有子节点，不可以删除"),
    LOGIN_PARAM_ERROR(219,"用户名或密码有误");

    /**
     * 状态码
     */
    private Integer code;
    /**
     * 信息
     */
    private String message;
    private ResultCodeEnum(Integer code,String message){
        this.code = code;
        this.message = message;
    }


}
